package com.example.sport.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.sport.domain.AthleteEventResult;
import com.example.sport.domain.Event;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface EventMapper extends BaseMapper<Event> {

    @Select({
            "<script>",
            "SELECT *",
            "FROM  t_event",
            "<where>",
            "  <if test='eventName != null and eventName.trim() != \"\"'>",
            "    name like CONCAT('%', #{eventName}, '%')",
            "  </if>",
            "</where>",
            "</script>"
    })
    List<Event> selectListByCollegeName(String eventName);

}
